<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta charset="utf-8">
		<title>新闻列表</title>
		<link th:href="@{/css/news_css/news.css}" rel="stylesheet" type="text/css" />
		<link rel="stylesheet" type="text/css" th:href="@{/css/news_css/test1.css}" />
		<link rel="stylesheet" th:href="@{/css/indexCss/index.css}" />
		<link rel="stylesheet" th:href="@{/css/indexCss/base.css}" />
		<script th:src="@{/js/indexJs/jquery-3.2.1.js}"></script>
		<script type="text/javascript">
			$(function() {
				$("header").load("/eolane/f/t/header"); /* 如果是电子制造服务导入common/header1.html，ODM客制化相关导入common/header2.html,以此类推 */
				$("footer").load("/eolane/f/t/footer"); /* 引入公共底部 */
				$(".rightxuanfu").load("/eolane/f/t/right"); /* 右侧悬浮框 */
			})
		</script>
	</head>
	<body >
		<header></header>
		<!-- 图片 -->
		<div class="inside-inner">
			<img th:src="@{/images/about/inner-banner.jpg}" alt='Leader in PCB & Technical Parts' style="width: 100%;height: 240px;" />
		</div>
		<div  style="background-color: #F2F2F2">
			
		
		<div  style="width: 1200px;padding: 40px 0;margin: auto;">
			
			<div class="sep-sidebar" style="float: left;">
				<div class="sep-box">
					<div class='el-box' style="background-color: white;">
						<a th:href="@{/f/t/news/companyNews(category=0)}">
							<div class="el-box-heading">公司新闻</div>
						</a>
						<div class="el-box-body">
							<ul th:if="${industryNewsList.size()==0}">
								<li>
									请添加新闻
								</li>
							</ul>

							<ul th:if="${industryNewsList.size()>0}" th:each="news,newsStat:${companyNewsList}">
								<li>
									<a th:href="@{/f/t/news/newsContent(id=${news.id})}" th:text="${news.title}"> </a>
								</li>

							</ul>
						</div>
						<a th:href="@{/f/t/news/companyNews(category=1)}">
							<div class="el-box-heading">行业新闻</div>
						</a>
						<div class="el-box-body">
							<ul th:if="${industryNewsList.size()==0}">
								<li>
									请添加新闻
								</li>
							</ul>
							<ul th:if="${industryNewsList.size()>0}" th:each="news,newsStat:${industryNewsList}">
								<li>
									<a th:href="@{/f/t/news/newsContent(id=${news.id})}" th:text="${news.title}"> </a>
								</li>
							</ul>
						</div>
					</div>
					<div class="sep-box el-box-c">
						<div class='el-box' style="background-color: white;">
							<div class="el-contact-box-heading">
								<img th:src="@{/images/about/contact.png}" alt='contact'>
							</div>
							<div class="foot-tel-center">
								<div style="font-size: 16px;font-weight: 400; line-height: 200%; margin-left: 20px; margin-top: 10px;">
									<p class="dt f14">&#9742;服务热线：<br />
										<span>400-871-0521</span>
									</p>
									<p class="dt f14">&#9993;公司邮箱：<br />
										<span>marketing@eolane.cn</span>
									</p>
									<br />
								</div>
							</div>
						</div>
					</div>

				</div>

			</div>
			<div  style="float: right; width: 890px;">

				<div class="sep-primary" style="background-color: white; height: 400px;">
					<diV style="text-align: center;" th:if="${news == null}">
						<h1 style="color: red">没新闻内容请添加新闻</h1>
					</diV>
					<div th:if="${news!=null}">



						<div  style="width: 80%; height: 90%;margin-left: 88px; ">
							<a th:href="@{/f/t/news/newsContent(id=${news.id})}"><img  th:src="@{'/eolane/news/'+ ${news.imageAddress} }" style="width: 750px; height: 320px;margin-top: 2%;" alt=""></a>
						</div>
						<div class="right" style="margin-top: 2%;" >
							<a th:href="@{/f/t/news/newsContent(id=${news.id})}" style="color: #000000;" >
								<h2 style="font-size: 37px; text-align: center;" th:text="${news.title}"></h2>
							</a>
							<h1 style="float: right; margin-right: 54px;" th:text="${#dates.format(news.releaseTime,'yyyy年MM月dd日 HH:mm:ss')}"></h1>
							<div class="right_bottom">
							</div>
						</div>
					</div>
				</div>

				<div class="sep-primary" style="background-color: white;">
					<div class="wrap">
						<div class="content">
							<ul>
								<li style="margin-left: 2%;">
									<h1 class="li1">热点新闻</h1>
								</li>
							</ul>
							<ul th:if="${industryNewsList.size()==0}">
								<li>
									空空没新闻
								</li>
							</ul>
							<ul th:if="${industryNewsList.size()>0}" th:each="news,newsStat:${companyList}">

								<li style="margin-left: 2%;">
									<div class="left" style="width: 150px; height: 100px;"><a th:href="@{/f/t/news/newsContent(id=${news.id})}">  <img  th:src="@{'/eolane/news/'+ ${news.imageAddress}}" style="width: 150px; height: 100px;" alt=""> </a></div>
									<div class="right">
										<div class="right_top">
											<a th:href="@{/f/t/news/newsContent(id=${news.id})}"><h3 style="color: #0C0C0C;" class="li1" th:text="${news.title}"></h3></a>
										</div>
										<div class="right_bottom">
											<a th:href="@{/f/t/news/newsContent(id=${news.id})}"><h1 style="float: right;color: #0C0C0C;margin-right: 50px;" th:text="${#dates.format(news.releaseTime,'yyyy年MM月dd日 HH:mm:ss')}"></h1></a>
										</div>
									</div>
								</li>

							</ul>
						</div>
						<div  style="margin-left: 40%; margin-top: 4%; border: 0px solid red;" >
						<input type="hidden" id="pageNo" th:value="${pageNo}">
						<input type="hidden" id="pageCount" th:value="${pageCount}">
							<div th:if="${news!=null}">
								<a th:href="@{/f/t/news/companyNews(pageNo=1,pageSize=${pageSize},category=${news.category})}">	   <input class="input_shang" type="button" value=" 首 页 " id="i1"/> </a>

								<a th:href="@{/f/t/news/companyNews(pageNo=${pageNo - 1},pageSize=${pageSize},category=${news.category})}">	   <input class="input_shang" type="button" value="上一页"  id="i2"/></a>

								 <a th:href="@{/f/t/news/companyNews(pageNo=${pageNo+1},pageSize=${pageSize},category=${news.category})}">	<input class="input_shang" type="button" value="下一页"  id="i3"  /></a>

								<a th:href="@{/f/t/news/companyNews(pageNo=${pageCount},pageSize=${pageSize},category=${news.category})}"><input class="input_shang" type="button" value=" 尾 页 "   id="i4"/></a>
							</div>
                        </div>
						<!--<span style="color:#428BCA" th:text="${currentPage}" / th:text="${totalPage }">当前页数 / onclick="window.location.href='@{p/f/news/companyNews?pageNo=${pageCount}&pageSize=${pageSize}'</span>-->
					</div>
				</div>
				
				
			</div>
			<div style="clear: both;"></div>
		</div>
		</div>
		<footer></footer>
		<div class="rightxuanfu"></div>

	</body>
	<script type="text/javascript">
		$(function () {
			if($("#pageNo").val()==1){
				$("#i1").attr("disabled","disabled");
				$("#i2").attr("disabled","disabled");
			}
			if($("#pageNo").val()==$("#pageCount").val()){
				$("#i3").attr("disabled","disabled");
				$("#i4").attr("disabled","disabled");
			}
		})
	</script>


</html>
